package com.ysx.student.zhangqingrong.com.ysx.day2;

import java.util.Scanner;

/**
 * @author 张青荣
 */
public class DemoTest1 {

    public static void main(String[] args) {

        getNum();


    }

    private static void getNum() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入：");
        int a = sc.nextInt();
        if (a % 2 != 0 && (a % 3 == 0 || a % 7 == 0)) {
            System.out.println("你输入的数字合法");
        } else {
            System.out.println("你输入的数字不合法");
        }


    }

}

